<?php
session_start();
if(!$_SESSION[username])
 	{
 		header('Location:login.html');	
 	}
require('config/conn.php');
$userName = $_SESSION['username'];
$res = mysql_query("select aid,section,title,addtime from article where username = '$userName'");

 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link type="text/css" rel="stylesheet" href="styles/pdeditor.css" />
	<title>我发表的文章</title>
</head>
<body>
 	<div  id="pdmain">
	 	<div style="height:40px;text-align:right;">
			<?php
		 		echo "$_SESSION[username]",'&nbsp;&nbsp;<a href="all_articles.php">所有帖子</a>&nbsp;&nbsp;<a href="index.php">返回</a>&nbsp;&nbsp;<a href="logout.php">退出</a>';
			?>	
		</div>
		<div style="font-size:12px;">
			<?php
			 		while ($row = mysql_fetch_array($res,MYSQL_NUM)){
			 			$aid = $row[0];
						$section = $row[1];
						$title = $row[2];
						$addTime = $row[3];
						echo '标题：<a href="article_detail.php?aid='.$aid.'">'."$title</a>&nbsp;&nbsp;板块：$section&nbsp;&nbsp;发表时间：$addTime &nbsp;&nbsp;作者：$_SESSION[username]  <br /><br />";
					}	
			?>
		</div>	
	</div>
</body>
</html>
